package com.atguigu05.method_more.valuetrancefer.ex1;

public class ex1 {
    public static void main(String[] args) {
        Circle c=new Circle();
        PassObject p1=new PassObject();
        p1.printArea(c,5);

    }
}

class Circle{
    double r;

    public double CalulateArea() {
        return r*r*3.14;
    }
}

class PassObject{
    public void printArea(Circle c,int time){
        for (int i = 1; i <= time; i++) {
            c.r=i;
            System.out.println(c.r+" "+c.CalulateArea());
        }
    }
}
